#!/bin/bash

wait_sec=60
#获取参数信息
if [ $# != 0 ];then
    wait_sec=$1
    if [ $((wait_sec+1)) -eq 1 ];
    then
    	wait_sec=60
	fi
fi

echo "开始时间:"`date -d "-1 day" "+%Y-%m-%d %H:%M:%S"`",脚本将暂停[$wait_sec秒钟]"

#睡眠wait_sec秒钟
sleep $wait_sec
wait
echo "结束时间:"`date -d "-1 day" "+%Y-%m-%d %H:%M:%S"`

